package com.jthinker.service;

import com.jthinker.bean.vo.QueryResult;
import com.jthinker.bean.vo.SearchFilter;

import java.util.List;
import java.util.Map;

/**
 * User: Gang Chen
 * Date: 2015/4/22 22:11
 */
public interface CategoryService
{
    Long findBySlug(String slug);

    boolean isSlugUnique(String slug);

    List<Map<String, Object>> findTree();

    void add(Map<String, Object> record) throws Exception;

    List<Map<String, Object>> findAll();

    QueryResult<Map<String, Object>> query(SearchFilter filter);

    void delete(String id) throws Exception;
}
